<table class="listas">
	<tr style="font-weight:bold;"> 
		<td>Buyer</td> 
		<td>Seller</td> 
		<td>Item</td> 
		<td>Amount</td>
		<td>Debt</td>
		<c:if test="${canConfirmDebt == 'true'}">
		<td>Debt Paid?</td>
		</c:if>
	</tr>
	<c:forEach var="purchase" items="${purchases}" varStatus="status">
		<c:if test="${purchase.debtPending == 'true'}">
		<tr>
			<td> <a href="../user/viewProfile?userid=<c:out value='${purchase.user.id}' /> "> <c:out value="${purchase.user.userName}" /> </a> </td> 
				<td> <a href="../user/viewProfile?userid=<c:out value='${purchase.item.user.id}' /> "> <c:out value="${purchase.item.user.userName}" /> </a> </td>
			<td> <a href="../item/itemDetail?itemid=<c:out value='${purchase.item.id}' /> "> <c:out value="${purchase.item.name}" /> </a> </td>
			<td> <c:out value="${purchase.qty}" /> </td>
			<td> <c:out value="${debts[status.index]}" /> </td>
			<c:if test="${canConfirmDebt == 'true'}">
			<td><a href="../purchase/cancelDebt?purchaseId=${purchase.id}"><img src="../../img/confirm.jpg" class="edit"></a></td>
			</c:if>
			
		</tr>
		</c:if> 				 					
	</c:forEach>
</table>